package com.jonluo.rabbit.sender;

import com.jonluo.rabbit.congif.RabbitUtils;
import com.jonluo.rabbit.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserSender {

    @Autowired
    private RabbitUtils rabbitUtils;

    public void send() {
        User user =new User();
        user.setName("jonluo");
        user.setPassword("123456789");
        System.out.println("user send : " + user.getName()+"&"+user.getPassword());
        this.rabbitUtils.send("user", user);
    }

}